<template>
  <div
    class="container_buy__content__shop__items"
    v-for="item of shopItems"
    :key="item.id"
    @click="
      () => {
        router.push(`/shop/${item.id}`);
      }
    "
  >
    <div class="container_buy__content__shop__items__left">
      <img :src="item.imgUrl" alt="" />
    </div>
    <div class="container_buy__content__shop__items__right">
      <div class="container_buy__content__shop__items__right__title">
        {{ item.title }}
      </div>
      <div class="container_buy__content__shop__items__right__mid">
        <div
          class="container_buy__content__shop__items__right__mid__items"
          v-for="(item, index) of item.tags"
          :key="index"
        >
          {{ item }}
        </div>
      </div>
      <div class="container_buy__content__shop__items__right__bottom">
        {{ item.notice }}
      </div>
    </div>
  </div>
</template>
<script setup>
import { reactive } from "vue";
import { useRouter } from "vue-router";
let itemId = defineProps({
  itemId: Number,
});
const router = useRouter();
const shopItems = reactive([
  {
    id: 1,
    imgUrl: "https://yydy.love/Resouce/药店.png",
    title: "某某药店1",
    tags: ["月售1万+", "起送¥1", "基础运费¥1"],
    notice: "VIP尊享满99元减4元运费券（每月1张）",
  },
  {
    id: 2,
    imgUrl: "https://yydy.love/Resouce/药店 (1).png",
    title: "某某药店2",
    tags: ["月售1万+", "起送¥1", "基础运费¥1"],
    notice: "VIP尊享满99元减4元运费券（每月2张）",
  },
  {
    id: 3,
    imgUrl: "https://yydy.love/Resouce/药店 (2).png",
    title: "某某药店3",
    tags: ["月售1万+", "起送¥1", "基础运费¥1"],
    notice: "VIP尊享满99元减4元运费券（每月3张）",
  },
  {
    id: 4,
    imgUrl: "https://yydy.love/Resouce/药店(3).png",
    title: "某某药店4",
    tags: ["月售1万+", "起送¥1", "基础运费¥1"],
    notice: "VIP尊享满99元减4元运费券（每月4张）",
  },
]);
</script>
<style lang="scss" scoped>
.container_buy__content__shop__items {
  box-sizing: border-box;
  display: flex;
  margin-bottom: 20rem;
  border-bottom: 1rem solid #d8d8d8;
  padding-bottom: 15rem;
  &__left {
    width: 80rem;
    height: 80rem;
    display: flex;
    justify-content: center;
    align-items: center;
    & img {
      width: 65rem;
      height: 65rem;
    }
  }
  &__right {
    margin-left: 10rem;
    font-size: 14rem;
    &__title {
      font-size: 16rem;
      font-weight: bold;
    }
    &__mid {
      margin: 10rem 0;
      display: flex;
      &__items {
        margin-right: 10rem;
      }
    }
    &__bottom {
      color: red;
    }
  }
}
</style>
